home *** CD-ROM | disk | FTP | other *** search
- Commands in this file:
- ADDBUFFERS
- DATE
- NEWCLI
- ENDCLI
- FILENOTE
- LIST
- INSTALL
- JOIN
- STACK
- SORT
- LOADWB
- MOUNT
- PROMPT
-
- ________________________________________________________________________________
-
- ADDBUFFERS
-
- adds buffers to reduce disk access time.
-
- The syntax is:
-
- BS> ADDBUFFERS df?: num
-
- Each buffer you add, the number "num", reduces available memory by about
- 500 bytes and the affect decreases if you add more than about 30.
-
- It is suggested that you start with 25 per drive.
- ________________________________________________________________________________
-
- DATE
-
- allows the internal clock to be updated to real world time.
-
- >> DATE
- /* current internal time */
-
- If your fortunate enough to have a battery-powered clock in your
- system, you don't really need this command. But, if you don't, the following
- sequence will A) tell you what time is currently set, B) ask you to input
- the time, C) write the time to the disk from where it will be used the
- next time you boot-up. The best place for these lines is toward the end of
- your startup-sequence. The reason being, if you type the date in wrong, the
- sequence will abort, if this is the last thing before LOADWB and ENDCLI, for
- instance, you can enter those commands yourself and you won't have to reboot.
- This wouldn't happen if you could type...I can't. /* One way around this aborted
- sequence business is to use the FAILAT command. We haven't covered it yet, but
- through it you can keep a batchfile from aborting if a specific command in it
- fails. */
-
- DATE
- DATE ?
- DATE >s:now
-
-
- ________________________________________________________________________________
-
- NEWCLI ENDCLI
-
- opens/closes a CLI window
-
- You can use this for various things that you know will tie up your
- window for an extended period. For instance, copying a file to the printer.
-
- A NEWCLI can be opened to a pre-determined size. The numbers you
- supply are the: X-coordinate of the upper left corner/Y-coordinate of the
- upper left corner/distance along the X-axis/distance along the Y-axis/title.
- More simply put they are...con:x/y/width/height/title. If you don't
- wish to have a title, it's not required, but the "/" after the height IS!!
-
- >> NEWCLI con:100/100/350/100/Sample_Window
-
- Click in Sample_window and type:
-
- >> ENDCLI
-
- Another function of a NEWCLI is to have it EXECUTE a batchfile when
- it's opened.
-
- >> NEWCLI con:100/100/350/100/ s:Sample_Batch
-
- Click in the new window /* notice: no title */ and type:
-
- >> ENDCLI
-
- If you have RUN a command from a CLI and then try to ENDCLI that window,
- the window won't close until the background tasks are finished. Let's use ED
- as a window holder again.
-
- >> NEWCLI
-
- Now click in THAT window and:
-
- >> ED ram:foo
- /* you might have to move things around a little to continue to type into
- the same window */
- >> ENDCLI
- /* the window doesn't go away */
-
- Now click in ED and:
- <ESC>
- * Q
-
- Now when the ED window disappears, so does the NEWCLI window you
- started.
-
- ________________________________________________________________________________
-
- FILENOTE
-
- attaches a comment, descriptive or otherwise, to a file.
-
- The syntax is:
- FILENOTE FILE/A, COMMENT/A
-
- if you don't use spaces in your comment, the quotes aren't necessary.
-
- >> FILENOTE examples/text comment /* use whatever COMMENT you want */
-
- Keep in mind that you don't have to use the word COMMENT in your
- command line but a "comment" is required.
-
- I suppose you're going to ask how to see these comments now?!?
-
- ________________________________________________________________________________
-
- LIST
-
- examines and lists specified data about a file or directory
-
- >> LIST examples
- Directory "examples" on /* date */
- First Dir rwed 21-Apr-88 /* time */
- text 33 rwed Today /* time */
- :/* your comment will be here */
- 1 files - 1 directories - 3 blocks - 33 bytes
-
- You'll notice that both subdirectories and files are listed. If it's
- a file the next column is it's size. Then it's protection status, and the date
- and time last changed.
-
- There are several options that we don't need to get into, but if
- your curious:
-
- >> LIST ?
- DIR,P=PAT/K,DATES/S,KEYS/S,NODATES/S,S/K,SINCE/K,SORT/S,TO/K,UPTO/K,QUICK/S:
-
- and type one in at the colon at the end of the line, remembering how the
- "/letter" business works. If you don't remember, refer to the
- CLI_tutorial.intro
- file.
- ________________________________________________________________________________
-
- INSTALL
-
- makes a disk "bootable"
-
- This command writes the information to a disk that allows it to be
- accepted at the hand-picture WB prompt. If you do this to an empty, formatted
- disk, you won't get much, but it will be accepted.
-
- This is also the command that's used to "kill viruses". Should your
- disks become infected, the virus will live in the "bootblock" of a disk until
- discovered and the disk is INSTALLed.
-
- ________________________________________________________________________________
-
- JOIN
-
- can append up to 15 files and make one.
-
- These files are added together one after another. After the list of
- files you want to JOIN, use the keyword AS and enter the destination_filename.
-
- >> COPY examples/text ram:
- >> COPY examples/text ram:text2
- >> COPY examples/text ram:text3
- >> CD ram:
- >> JOIN text text2 text3 AS new
- >> TYPE new
-
- /* Not too imaginative, but gives you a feel for the thing */
-
- ________________________________________________________________________________
-
- STACK
-
- can change the stack allowed for the execution of commands.
-
- Whenever a program is run it requires and utilizes an amount of
- memory for the record-keeping that goes on in the program. This memory
- is called the "stack".
-
- >> STACK
- current stack size is 4000 bytes
-
- 4000 is the default stack size for a CLI. Some commands and programs
- require a greater stack though. As it says in the AmigaDOS manual:
- "WARNING: The only indication that you have run out of stack is that
- the Amiga crashes! If you are not sure, it is better to overestimate the
- amount you need."
-
- Don't panic, as a general rule, you won't need to worry about it. But
- just for practice:
-
- >> STACK 8000
- >> STACK
- current stack size is 8000 bytes
- ________________________________________________________________________________
-
- SORT
-
- is a limited text sorter.
-
- SORT requires that you tell it either FROM filename or TO filename,
- and will alphabetically rummage through and give you the results.
- It's only option is COLSTART /* for which column to start in */.
-
- Another warning, this is one of the only commands that really has the
- potential to run over stack size if you're doing large files.
-
- >> CD
- ram: /* just checking */
- >> SORT new TO new2
- >> TYPE new2
- /* should be a file with three of each line */
- >> SORT new TO new3 COLSTART 2
- >> TYPE new3
- /* this time the SECOND letter in each line will be in order */
-
- This can be handy if you have two similar lists and aren't sure
- what's common to both lists. By going through the steps we just went through
- starting with JOIN, and then EDiting the result of the sort, duplicates will
- appear twice, of course, and on adjacent lines.
- ________________________________________________________________________________
-
- /* time out for a ram: clean-up */
-
- >> DELETE ram:#?
-
- /* the "#" is a wildcard that matches any single character and the "?" will
- match 0 or more repetitions of it. this method shouldn't touch C: because
- you can only DELETE a directory if it's empty */
-
- ________________________________________________________________________________
-
- LOADWB
-
- creates the workbench screen.
-
- This command is usually only found in the startup-sequence, since
- it only is run once until you reboot. However, if the startup-sequence
- aborts for some reason, if you have your startup-sequence set-up to end in a
- CLI, or if you interrupt it with <CTRL>D for reasons known only to you, you
- might want to LOADWB at some point.
-
- ________________________________________________________________________________
-
- MOUNT
-
- make a device that doesn't autoconfigure available
-
- MOUNT directs AmigaDOS to the devs:mountlist, where it needs to find a
- specification list for the device you have told it to MOUNT. You generally
- won't be required to do this, but sometimes you'll run across a software
- "device" that has to be handled this way.
-
- >> TYPE devs:mountlist
-
- One example of a software device is the ASDG recoverable ram disk.
- I've included a copy of my mountlist so that you can compare.
-
- >> TYPE devs:mountlist_2
- /* the listing that has VD0: on the left side of the top line is the
- specification for the recoverable ram disk. Don't worry if it doesn't make
- much sense */
-
- To be able to utilize this "device", I have a line, in my startup-
- sequence that says:
-
- MOUNT VD0:
-
- /* I can see your wheels turning, you won't be able to do this at
- the present time since you don't have the other files necessary to make
- VD0: work....but nice try! */
-
- ________________________________________________________________________________
-
- PROMPT
-
- allows you to redefine the prompt that appears in your CLI windows.
-
- The syntax is similar to ECHO, but quotes aren't required unless
- you want a space to appear as part of your prompt.
- Prompts can be virtually any character string you want.
-
- >> PROMPT "OK, what do you want now? > "
-
- Just a few handy comments. First, notice the <SPACE> between the ">"
- and the final ". Try typing in the same line but without the <SPACE> and notice
- what happens to the cursor position. It makes no difference, just personal
- preference. The same sort of thing happens if the FIRST character within the
- quotes is a <SPACE>.
-
- If you want your prompt to display the CLI task number associated with
- that window, you'd put "%N" in the string somewhere.
-
- >> PROMPT "%N> "
- /* That's the original prompt */
-
- Typing in PROMPT with no argument gives you a single ">". /* unless
- your using the ARP /* AmigaDOS Replacement Project */ commands, which I doubt.
- The ARP commands default to "current directory>".
-
- ________________________________________________________________________________
-
-
- That'll about do it for this file. By now you should be learning the
- drill. But, if you've forgotten:
-
- READER CLI_tutorial.4
-
- is next.
-